<template>
  <div>
    <el-dialog
      title="入驻申请信息"
      :visible.sync="dialogVisible"
      width="700px"
    >
      <div class="description" v-loading="loading">
        <div class="title">店铺信息</div>
        <div class="acea-row">
          <div class="description-term">店铺名称：{{adoptShopDatalist.dpName}}</div>
          <div class="description-term">店铺地址：{{adoptShopDatalist.dpAddress}}</div>
          <div class="description-term">店铺所属区域：{{adoptShopDatalist.dpRegion}}</div>
          <div class="description-term">店铺种类：{{adoptShopDatalist.dpSpecies}}</div>
          <div class="description-term">店铺id：{{adoptShopDatalist.id}}</div>
          <div class="description-term">店铺简介：{{adoptShopDatalist.dpText}}</div>
        </div>
        <el-divider></el-divider>

        <div class="title">资质信息</div>
        <div class="acea-row">
          <div class="description1-term">
            <el-image v-for="url in urls" :key="url" :src="url" lazy></el-image>
          </div>
        </div>
      <span slot="footer" class="dialog-footer">
          <el-button type="primary" @click="modal2 = false">关闭</el-button>
          <el-button type="success" @click="modal2 = false">通过</el-button>
          <el-button type="danger" @click="modal2 = false">拒绝</el-button>
      </span>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { adoptShopDetail } from '@/api/adoptShop'
export default {
  name: 'AdoptShopDetail',
  props: {
    id: {
      type: String,
      default: 0
    }
  },
  data() {
    return {
      reverse: true,
      dialogVisible: false,
      adoptShopDatalist: {
        dpName:'',
        dpAddress:'',
        dpRegion:'',
        dpSpecies:'',
        id:'',
        dpText:'',
        dpOthers:''
      },
      loading: false,
      modal2: false,
      result: [],
      urls:[],
      us:[]
    }
  },
  mounted() {
  },
  methods: {
    getAdoptShopDetail(id) {
      this.loading = true
      adoptShopDetail({id: id}).then(res => {
        this.adoptShopDatalist = res
        this.loading = false;
        this.urls = [];
        for(var n = 0;n<this.adoptShopDatalist.dpOthers.split(',').length;n++){
            this.urls.push(this.adoptShopDatalist.dpOthers.split(',')[n])
        };
      }).catch(() => {
        this.adoptShopDatalist = null
        this.loading = false
      })
    }
  }
}
</script>

<style scoped lang="scss">
  .logistics {
    align-items: center;
    padding: 10px 0px;
    .logistics_img {
      width: 45px;
      height: 45px;
      margin-right: 12px;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .logistics_cent {
      span {
        display: block;
        font-size: 12px;
      }
    }
  }

  .trees-coadd {
    width: 100%;
    height: 400px;
    border-radius: 4px;
    overflow: hidden;
    .scollhide {
      width: 100%;
      height: 100%;
      overflow: auto;
      margin-left: 18px;
      padding: 10px 0 10px 0;
      box-sizing: border-box;
      .content {
        font-size: 12px;
      }

      .time {
        font-size: 12px;
        color: #2d8cf0;
      }

    }
  }

  .title {
    margin-bottom: 14px;
    color: #303133;
    font-weight: 500;
    font-size: 14px;
  }

  .description {
    &-term {
      display: table-cell;
      padding-bottom: 5px;
      line-height: 20px;
      width: 50%;
      font-size: 12px;
      color: #606266;
    }
    ::v-deep .el-divider--horizontal {
      margin: 12px 0 !important;
    }
  }

  .description1 {
    &-term {
      display: table-cell;
      padding-bottom: 5px;
      line-height: 20px;
      width: 100%;
      font-size: 12px;
      color: #606266;
    }
    ::v-deep .el-divider--horizontal {
      margin: 12px 0 !important;
    }
  }

</style>
